begintownscript;

variables;

int i,b,c,d,j,k,r1,choice;

body;
// FLAGS USED:
// 82,2 - NOT ANY MORE!

beginstate INIT_STATE;

enable_add_chars(1);

//Names must appear first.
break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
break;

beginstate 17;
//if (get_flag(82,2) > 0)
//end();

//set_total_visibility(1);
force_view_center(115,11);
force_instant_terrain_redraw();
pause(15);

force_view_center(20,12);
text_bubble_on_char(8,"Welcome Back");
force_instant_terrain_redraw();
pause(15);

force_view_center(20,12);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"Come. We must talk");
march_party(16,11);
pause(15);

force_instant_terrain_redraw();
i = random_party_member();
b = random_party_member();
text_bubble_on_char(8,"");
text_bubble_on_char(0,"We did it!");
relocate_character(8,18,12);
march_party(12,11);
pause(15);

force_instant_terrain_redraw();
text_bubble_on_char(0,"");
text_bubble_on_char(8,"That you did.");
relocate_character(8,19,12);
march_party(18,11);
pause(15);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"It was quite impressive.");
relocate_character(8,20,12);
march_party(19,11);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"You are the first");
relocate_character(8,21,12);
march_party(20,11);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"to have completed");
//relocate_character(8,22,12);
march_party(21,11);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"this challenge.");
relocate_character(8,23,12);
march_party(22,11);
pause(20);

force_instant_terrain_redraw();
force_view_center(23,13);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"Now if we ever");
relocate_character(8,23,13);
march_party(22,12);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"encounter the");
relocate_character(8,23,14);
march_party(22,13);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"Vahnatai again,");
relocate_character(8,23,15);
march_party(22,14);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"and are forced to");
relocate_character(8,23,15);
march_party(22,15);
pause(20);

force_instant_terrain_redraw();
force_view_center(23,16);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"fight them, we");
relocate_character(8,23,16);
march_party(22,16);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"have a group of");
relocate_character(8,23,17);
march_party(22,17);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"adventurers,");
pause(15);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"trained to combat");
relocate_character(8,23,18);
march_party(22,18);
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"them.");
relocate_character(8,23,19);
march_party(22,19);
pause(20);

force_instant_terrain_redraw();
force_view_center(23,19);
text_bubble_on_char(8,"");
text_bubble_on_char(b,"Thanks.");
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(b,"");
text_bubble_on_char(0,"Though that was");
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(0,"");
text_bubble_on_char(0,"very hard. At one");
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(0,"");
text_bubble_on_char(0,"point I thought I");
pause(20);

force_instant_terrain_redraw();
text_bubble_on_char(0,"");
text_bubble_on_char(0,"wouldn't make it.");
pause(20);

force_instant_terrain_redraw();
force_view_center(23,19);
text_bubble_on_char(0,"");
text_bubble_on_char(8,"But you did,");
relocate_character(8,23,20);
march_party(22,21);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,20);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"even though it was");
relocate_character(8,23,21);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,22);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"nothing more than a");
relocate_character(8,23,22);
march_party(22,22);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,23);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"magical extrapolation");
relocate_character(8,23,23);
march_party(22,23);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,24);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"of what combating");
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"the Vahnatai would be.");
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(i,"But it was real-to us");
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(i,"");
text_bubble_on_char(8,"Yes it was, but");
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"even if you had");
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"_died_ in the valley,");
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(8,"nothing would have");
pause(17);

force_instant_terrain_redraw();
force_view_center(23,24);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"happened to you.");
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
text_bubble_on_char(i,"Can we go now?");
pause(17);

force_instant_terrain_redraw();
force_view_center(23,24);
text_bubble_on_char(i,"");
text_bubble_on_char(8,"Of course. As soon");
relocate_character(8,23,24);
march_party(22,24);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,25);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"as you promise to");
relocate_character(8,23,25);
march_party(22,25);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,26);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"keep this base a");
relocate_character(8,23,26);
march_party(22,26);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,27);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"secret, to anyone");
relocate_character(8,23,27);
march_party(22,27);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,28);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"apart from the");
relocate_character(8,23,28);
march_party(22,28);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,29);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"Empress herself.");
relocate_character(8,23,29);
march_party(22,29);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,29);
text_bubble_on_char(8,"");
text_bubble_on_char(b,"Agreed.");
pause(17);

force_instant_terrain_redraw();
force_view_center(23,29);
text_bubble_on_char(b,"");
text_bubble_on_char(i,"Adventurers pact.");
pause(17);

force_instant_terrain_redraw();
force_view_center(23,29);
text_bubble_on_char(i,"");
text_bubble_on_char(8,"Then you may go.");
pause(17);

force_instant_terrain_redraw();
force_view_center(23,29);
text_bubble_on_char(8,"");
text_bubble_on_char(8,"Goodbye.");
relocate_character(8,23,28);
march_party(22,30);
pause(17);

force_instant_terrain_redraw();
text_bubble_on_char(8,"");
force_view_center(23,31);
march_party(23,31);
pause(17);

force_instant_terrain_redraw();
force_view_center(23,32);
march_party(23,32);
pause(17);

force_instant_terrain_redraw();
force_view_center(24,33);
march_party(24,33);
pause(17);

force_instant_terrain_redraw();
force_view_center(24,34);
march_party(24,34);
pause(17);

force_instant_terrain_redraw();
force_view_center(24,35);
march_party(24,35);
pause(17);

force_instant_terrain_redraw();
force_view_center(24,36);
march_party(24,36);
pause(17);

move_to_new_town(16,24,36);

break;

// MUST REMEMBER TO FINISH MOVING PARTY AND CHARACTER 8. USE NUMBERS BENEATH CALLS USED!~DONE
// 22/23,30 but ends at 24,36 ~ DONE

beginstate 19;
block_entry(1);
message_dialog("You've completed your mission. It was weird enough, and you don't want anything more to do with this place.","You decide to go. You doubt that you're near any large town, but you're sure you'll find one soon enough!");
break;

beginstate 27;  
reset_dialog();
add_dialog_str(0,"You can't help but think back on what has happened to you.",0);
add_dialog_str(1,"When you first read the sign which brought you on this long and weary road, you thought that you would be helping a small Undead problem.",0);
add_dialog_str(2,"Then you stepped through the Portal, and instead of finding yourself in this remote valley you had been told all about, you met a Mage, from the TRIAD!",0);
add_dialog_str(3,"He took you to the chairs, and told you that you were being trained for combating strange monsters. You didn't have much choice, so you sat on the chairs.",0);
add_dialog_str(4,"Then you appeared in the valley. And all your worries were swept aside in the thrill of danger. But why was this all a secret. Are the Vahnatai really this dangerous?",0);
add_dialog_str(5,"Well, it isn't your concern. Then you think. He did say that you would keep the items you _acquired_ in the simulation - didn't he?",0);
add_dialog_str(6,"You leave the base. It will take you some time to return home, but you have a lot to think about.",0);
add_dialog_choice(0,"THE END!");
run_dialog(0);
message_dialog("I just want to thank all of those who helped make this scenario what it is.","");
message_dialog("To my testers, for having the patience (or lack of) that helped me make this scenario.","");
message_dialog("To the helpers online, on the Spiderweb Boards, who helped me when I had problems.","");
message_dialog("To my fans online, who at least were amusing to watch as they tried to defend this scenario.","");
message_dialog("Thanks - all of you!","NEARLY THERE!");
message_dialog("And finally. To prove that you've played the scenario and won it, your password!","Email me on the given address so I know who has won the game first. Their names will be placed in a Hall of Fame file.");
message_dialog("password = 018Y228A347Y30","email me at _micael456@aol.com_");
message_dialog("_THE END_","(at last)");
end_scenario(1);
break;